#pragma once
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>

class DirectInput
{

public:
      DirectInput(DWORD keyboardCoopFlags, DWORD mouseCoopFlags);
      ~DirectInput();

      void poll();
      bool keyDown(char key);
      bool mouseButtonDown(int button);
      float mouseDX() ;
      float mouseDY() ;
      float mouseDZ() ;

private:
      DirectInput(const DirectInput& rhs);
      DirectInput& operator = (const DirectInput& rhs);

private:
      IDirectInput8*       m_pInput;

      IDirectInputDevice8* m_pInputDev;
      char                 m_cKeyState[256];

      IDirectInputDevice8* m_Mouse;
      DIMOUSESTATE2        m_MouseState;
};

extern DirectInput* g_pInput;